package org.jarraiders.musiclibrary.client.event;

import org.jarraiders.musiclibrary.shared.domain.ArtistDTO;

import com.google.gwt.event.shared.GwtEvent;

public class ArtistUpdatedEvent extends GwtEvent<ArtistUpdatedEventHandler>{
  public static Type<ArtistUpdatedEventHandler> TYPE = new Type<ArtistUpdatedEventHandler>();
  private final ArtistDTO updatedArtist;
  
  public ArtistUpdatedEvent(ArtistDTO result) {
    this.updatedArtist = result;
  }
  
  public ArtistDTO getUpdatedArtist() { return updatedArtist; }
  

  @Override
  public Type<ArtistUpdatedEventHandler> getAssociatedType() {
    return TYPE;
  }

  @Override
  protected void dispatch(ArtistUpdatedEventHandler handler) {
    handler.onArtistUpdated(this);
  }
}
